package com.boboPlanet.user.constants;

/**
 * @Description: TODO ES DSL语句集合
 * @Author: mis_wu
 * @Date: 2023/6/21
 * @Company planet
 **/
public class ElasticDslConstants {

    /**
     * 创建文章ES索引，索引一旦创建，除了能新增字段外，不能再修改(修改字段名，类型等均不行)
     */
    public static final String CREATE_ARTICLE_INFO_INDEX_DSL = "{\n" +
            " \"mappings\": {\n" +
            "   \"properties\": {\n" +
            "     \"articleId\":{\n" +
            "       \"type\": \"keyword\"\n" +
            "     },\n" +
            "     \"userId\":{\n" +
            "       \"type\": \"keyword\"\n" +
            "     },\n" +
            "     \"articleUser\":{\n" +
            "       \"type\": \"text\",\n" +
            "       \"analyzer\": \"ik_max_word\"\n" +
            "     },\n" +
            "     \"accountId\":{\n" +
            "       \"type\": \"keyword\"\n" +
            "     },\n" +
            "     \"articleTypeId\":{\n" +
            "       \"type\": \"keyword\"\n" +
            "     },\n" +
            "     \"articleTypeName\":{\n" +
            "       \"type\": \"text\",\n" +
            "       \"analyzer\": \"ik_max_word\"\n" +
            "     },\n" +
            "     \"articleTitle\":{\n" +
            "       \"type\": \"text\",\n" +
            "       \"analyzer\": \"ik_max_word\"\n" +
            "     },\n" +
            "     \"isAnonymous\":{\n" +
            "       \"type\": \"integer\"\n" +
            "     },\n" +
            "     \"planetUpdateTime\":{\n" +
            "       \"type\": \"date\"\n" +
            "     },\n" +
            "     \"planetUpdateUser\":{\n" +
            "       \"type\": \"keyword\",\n" +
            "       \"index\": false\n" +
            "     },\n" +
            "     \"articleState\":{\n" +
            "       \"type\": \"integer\"\n" +
            "     },\n" +
            "     \"version\":{\n" +
            "       \"type\": \"integer\",\n" +
            "       \"index\": false\n" +
            "     },\n" +
            "     \"articleDetailId\":{\n" +
            "       \"type\": \"keyword\"\n" +
            "     },\n" +
            "     \"articleContent\":{\n" +
            "       \"type\": \"text\",\n" +
            "       \"analyzer\": \"ik_max_word\"\n" +
            "     }\n" +
            "   }\n" +
            " } \n" +
            "}";



}
